import React from 'react'
// ===================================================================== Temp
import SearchForm from '#cpt/temp/SearchForm'
import Table from '#cpt/temp/Table'
// ===================================================================== Declare
// const { $fn } = window
// ===================================================================== component
class Index extends React.Component{
	state = {
		data:[],
		pag: {},
		// selectedKeys:[],
		// 搜索表单列表
		forms : [
			{ label: '关键字',			name: 'title' },
			{ label: '状态',			name: 'is_view',	type: 'select',data: this.props.status},
		],
	}
	
	model = {}
	
	componentDidMount(){
		this.fetch()
	}
	// paging
	fetch = reset => {
		// $fn.fetch.call(this,'msg-system/index', { reset })
	}
	
	// 表单
	cols = [
		{ title: '公告名称', 		dataIndex: 'title', 		},
		{ title: '作者', 			dataIndex: 'user_name', 	width:'25%' },
		{ title: '日期', 			dataIndex: 'publish_at', 	width:'25%' },
	]
	render(){
		return (
			<>
				{/* 搜索 */}
				{ SearchForm.call(this) }
				{/* 表格 */}
				{ Table.call(this, { }) }
			</>
		)
	}
}

export default Index